home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / nimgvb10 / module1.bas < prev    next >
Encoding:
BASIC Source File  |  1995-12-20  |  1.9 KB  |  51 lines

  1. Attribute VB_Name = "Module1"
  2. Public Const NED_32IMAGE_E_NOERROR As Integer = 0
  3. Public Const NED_32IMAGE_E_OUTOFMEMORY As Integer = 1
  4. Public Const NED_32IMAGE_E_NOIMAGE As Integer = 2
  5. Public Const NED_32IMAGE_E_BADIMAGE As Integer = 3
  6. Public Const NED_32IMAGE_E_BADIMAGETYPE As Integer = 4
  7. Public Const NED_32IMAGE_E_REDUCTIONFAILED As Integer = 5
  8. Public Const NED_32IMAGE_E_FILENOTFOUND As Integer = 6
  9. Public Const NED_32IMAGE_E_OUTOFVAS As Integer = 7
  10. Public Const NED_32IMAGE_E_FILEMAPPING As Integer = 8
  11. Function HasError(nError As Integer) As Boolean
  12. Dim bRet As Boolean
  13. bRet = False
  14.  
  15.     Select Case nError
  16.         Case Is = NED_32IMAGE_E_NOERROR
  17.             'No Error
  18.             
  19.         Case Is = NED_32IMAGE_E_OUTOFMEMORY
  20.             MsgBox ("There is not enough memory to load this image!")
  21.         Case Is = NED_32IMAGE_E_NOIMAGE
  22.             MsgBox ("No image is loaded!")
  23.             bRet = True
  24.         Case Is = NED_32IMAGE_E_BADIMAGE
  25.             MsgBox ("The image file is not correct!")
  26.             bRet = True
  27.         Case Is = NED_32IMAGE_E_BADIMAGETYPE
  28.             MsgBox ("The image file type is not supported!")
  29.             bRet = True
  30.         Case Is = NED_32IMAGE_E_REDUCTIONFAILED
  31.             MsgBox ("The color reduction step failed!")
  32.             bRet = True
  33.         Case Is = NED_32IMAGE_E_FILENOTFOUND
  34.             MsgBox ("The file specification was not found!")
  35.             bRet = True
  36.         Case Is = NED_32IMAGE_E_OUTOFVAS
  37.             MsgBox ("There is not enough Virtual Address Space to load this file!")
  38.             bRet = True
  39.         Case Is = NED_32IMAGE_E_FILEMAPPING
  40.             MsgBox ("The Image File could note be mapped into memory!")
  41.             bRet = True
  42.         Case Else
  43.             MsgBox ("The NED Image OCX had an unspecified error!")
  44.             bRet = True
  45.     End Select
  46.     
  47.     HasError = bRet
  48. End Function
  49.  
  50.  
  51.